import React from 'react'
import { Routes,Route,Navigate } from 'react-router-dom'

import About from '../../pages/About'
import Home from '../../pages/Home'
export default function Body() {
  return (
    <div className="col-xs-6">
        <div className="panel">
        <div className="panel-body">
            {/* 注册路由 */}
            <Routes>
                <Route path='/about' element={<About/>}/>
                <Route path='/home' element={<Home/>}/>
                <Route path='/' element={<Navigate to='/home'/>}/>
            </Routes>
        </div>
        </div>
    </div>
  )
}
